package cn.bdqn.domain;

import java.io.Serializable;

/**
 * 订单配货实体类
 * @author dkj
 */
public class OrderForm implements Serializable {

    /**
     * id
     */
    private Integer id;

    /**
     * 订单id
     */
    private Integer orderId;

    /**
     * 订单对象
     */
    private Order order;

    /**
     * 货物id
     */
    private Integer cargoId;

    /**
     * 货物对象
     */
    private Cargo cargo;

    /**
     * 货物名
     */
    private String cargoName;

    /**
     * 货物总数量
     */
    private Integer cargoSumNumber;

    /**
     * 货物总重量
     */
    private Integer cargoSumWeight;

    /**
     * 货物总体积
     */
    private Integer cargoSumBulk;


    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = order==null?orderId:order.getId();
    }

    public Integer getCargoId() {
        return cargoId;
    }

    public void setCargoId(Integer cargoId) {
        this.cargoId = cargo==null?cargoId:cargo.getId();
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Order getOrder() {
        return order;
    }

    public void setOrder(Order order) {
        this.order = order;
    }

    public Cargo getCargo() {
        return cargo;
    }

    public void setCargo(Cargo cargo) {
        this.cargo = cargo;
    }

    public String getCargoName() {
        return cargoName;
    }

    public void setCargoName(String cargoName) {
        this.cargoName = cargoName == null ? null : cargoName.trim();
    }

    public Integer getCargoSumNumber() {
        return cargoSumNumber;
    }

    public void setCargoSumNumber(Integer cargoSumNumber) {
        this.cargoSumNumber = cargoSumNumber;
    }

    public Integer getCargoSumWeight() {
        return cargoSumWeight;
    }

    public void setCargoSumWeight(Integer cargoSumWeight) {
        this.cargoSumWeight = cargoSumWeight;
    }

    public Integer getCargoSumBulk() {
        return cargoSumBulk;
    }

    public void setCargoSumBulk(Integer cargoSumBulk) {
        this.cargoSumBulk = cargoSumBulk;
    }


    @Override
    public String toString() {
        return "OrderForm{" +
                "id=" + id +
                ", orderId=" + orderId +
                ", order=" + order +
                ", cargoId=" + cargoId +
                ", cargo=" + cargo +
                ", cargoName='" + cargoName + '\'' +
                ", cargoSumNumber=" + cargoSumNumber +
                ", cargoSumWeight=" + cargoSumWeight +
                ", cargoSumBulk=" + cargoSumBulk +
                '}';
    }
}
